package com.baichang.taoshunda.dao.impl;


import com.baichang.framework.dao.impl.BaseDaoImpl;
import com.baichang.taoshunda.dao.FreezeOrderDao;
import com.baichang.taoshunda.entity.FreezeOrder;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * Created by ${wushenglu} on 2018/8/10.
 */
@Repository
public class FreezeOrderDaoImpl extends BaseDaoImpl<FreezeOrder> implements FreezeOrderDao {
    @Override
    public List<FreezeOrder> getFreezeOrder() {
        String sql = " SELECT * FROM t_freeze_order WHERE freeze_time<=NOW() ";
        return queryForBeanList(sql);
    }

    @Override
    public FreezeOrder getFreezeOrderByOrderNumber(String orderNumber) {
        String sql = "SELECT * FROM t_freeze_order WHERE order_number=?";
        return queryForBean(sql, orderNumber);
    }
}
